Copyright: Copyright ® 1994 by Digital PowerTOOLS


contents
Drive Plus DLL Help

Copyright © 1994 by Digital PowerTOOLS

Another Shareware Product from Digital PowerTOOLS

Overview of DrvPlus.DLL

Assorted Functions

Data Manipulation Functions

Drive Functions

File Functions

RAM Functions

Copyright Notice

Order Form and Software Evaluation Form

Shareware Concept

Shareware License

Shareware Registration

Custom DLL's

Registered License


Assorted Functions

GetDrvPlusVersion

Declare Function GetDrvPlusVersion% Lib "DrvPlus.DLL" ()

* Returns the version number of DrvPlus.DLL.  The returned value is 100 times the actual version, i.e., a returned value of 150 represents version 1.50 (150/100).


Data Manipulation Functions

GetHighByte

Declare Function GetHighByte% Lib "DrvPlus.DLL" (ByVal OrgInt%)

* Returns the high byte value of a given integer.

GetLowByte

Declare Function GetLowByte% Lib "DrvPlus.DLL" (ByVal OrgInt%)

* Returns the low byte value of a given integer.

GetHighWord

Declare Function GetHighWord& Lib "DrvPlus.DLL" (ByVal OrgLong&)

* Returns the high word value of a given long number.

GetLowWord

Declare Function GetLowWord& Lib "DrvPlus.DLL" (ByVal OrgLong&)

* Returns the low word value of a given long number.

PeekByte

Declare Function PeekByte% Lib "DrvPlus.DLL" (ByVal TheSegment%, ByVal TheOffset%)

* Returns the integer value at the specified Segment and Offset address in RAM.

PokeByte

Declare Sub PokeByte Lib "DrvPlus.DLL" (ByVal TheSegment%, ByVal TheOffset%, ByVal PokeValue%)

* Inserts the selected value into the specified Segment and Offset address in RAM.


Drive Functions

GetDefaultDrive

Declare Function GetDefaultDrive% Lib "DrvPlus.DLL" ()

* Returns the DOS drive number of the default drive.  1=A, 2=B, 3=C, and so on.
* Add 64 to the return value to obtain the ASC value of the default drive letter.

SetDefaultDrive

Declare Function SetDefaultDrive% Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Sets the default drive.  DriveNbr% is the DOS drive number.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.
* Returns the number of logical drives set by LASTDRIVE in Config.sys.
* Use GetDriveSize to determine if a drive is valid.

GetBootDrive

Declare Function GetBootDrive% Lib "DrvPlus.DLL" ()

* Returns the DOS drive number of the boot drive.  1=A, 2=B, 3=C, and so on.
* Add 64 to the return value to obtain the ASC value of the default drive letter.

GetDriveSize

Declare Function GetDriveSize& Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Returns the TOTAL SIZE (in bytes) of the selected drive.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.
* If the drive size is 0, then the drive is invalid.  Use this feature to ascertain valid drives.

GetDriveFree

Declare Function GetDriveFree& Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Returns the amount of FREE space (in bytes) on the selected drive.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.

GetDriveSize

Declare Function GetDriveUsed& Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Returns the amount of USED space (in bytes) on the selected drive.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.

GetClustersOnDrive

Declare Function GetClustersOnDrive& Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Returns the number of clusters on the selected drive.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.

GetSectorsPerCluster

Declare Function GetSectorsPerCluster& Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Returns the number of sectors per cluster on the selected drive.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.

GetBytesPerSector

Declare Function GetBytesPerSector& Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Returns the number of bytes per sector on the selected drive.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.

HowManyFloppies

Declare Function HowManyFloppies% Lib "DrvPlus.DLL" ()

* Returns the number of floppy drives on the system.

HowManyCDdrives

Declare Function HowManyCDdrives% Lib "DrvPlus.DLL" ()

* Returns the number of CD drives on the system.

IsDriveCD

Declare Function IsDriveCD% Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Determines if the specified drive is a CD.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.
* Returns TRUE (-1) if it is a CD drive; returns FALSE (0) otherwise.

IsDriveRemovable

Declare Function IsDriveRemovable% Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Determines if the specified drive is Removable (a floppy drive).
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.
* Returns TRUE (-1) if it is a floppy (removable); returns FALSE (0) otherwise.

IsDriveLocal

Declare Function IsDriveLocal% Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Determines if the specified drive is Local or Remote.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.
* Returns TRUE (-1) if it is local; returns FALSE (0) if it is remote.

IsDriveLocalShared

Declare Function IsDriveLocalShared% Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Determines if the specified drive is local, but shared on a network.
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.
* Returns TRUE (-1) if it is a shared local drive; returns FALSE (0) otherwise.

IsDriveSubst

Declare Function IsDriveSubst% Lib "DrvPlus.DLL" (ByVal DriveNbr%)

* Determines if the specified drive is a substituted drive (using the DOS subst command).
* 1=A, 2=B, 3=C, and so on.  Subtract 64 from the ASC value of the Drive Letter.
* Returns TRUE (-1) if it is a substituted drive; returns FALSE (0) otherwise.


File Functions

SetVolName

Declare Function SetVolName% Lib "DrvPlus.DLL" (ByVal DriveNbr%, ByVal lpVolName$)

* Changes the name of volume (disk label).

* DriveNbr% is the DOS number for the drive.  1=A, 2=B, 3=C, and so on.

* You can convert a drive letter to a drive number by substracting 64 from the ASC value of the letter.

* For example,  DriveNbr%=ASC("A")-64.  Make sure the Drive Letter is uppercase.

* The volume name may be up to 11 characters and may include blank spaces.

* Using lpVolName$ as an empty string deletes the current volume label.

* The return value is TRUE (-1) when successful or FALSE (0) if it fails.

SetFileDate

Declare Function SetFileDate% Lib "DrvPlus.DLL" (ByVal lpString$, ByVal TheYear%, ByVal TheMonth%, ByVal TheDate%)

* Changes the date stamp of an existing file.

* lpString$ is the full path including the file name.

* TheYear% range is 1980 - 2107.  This is an inherent DOS limitation.

* TheMonth% range is 1 - 12.

* TheDate% range is 1 - 31.

* Returns TRUE (-1) when successful; returns FALSE (0) if it fails.

SetFileTime

Declare Function SetFileTime% Lib "DrvPlus.DLL" (ByVal lpString$, ByVal TheHours%, ByVal TheMinutes%)

* Changes the time stamp of an existing file.

* lpString$ is the full path including the file name.

* TheHours% range is 0 - 23.

* TheMinutes% range is 0 - 59.

* Returns TRUE (-1) when successful; returns FALSE (0) if it fails.

ExtFromPath

Declare Sub ExtFromPath Lib "DrvPlus.DLL" (ByVal lpFullPath$, ByVal lpString$)

* Extracts the file extension from a full path.

* lpFullPath$ is the full path including the file name.

* lpString$ should be set to 255 blank spaces before calling the function.

* For example, lpString$=space$(255).

* Upon completion, lpString$ will contain the file extension.

FileNameOnlyFromPath

Declare Sub FileNameOnlyFromPath Lib "DrvPlus.DLL" (ByVal lpFullPath$, ByVal lpString$)

* Extracts the filename (without the extension) from a full path.
* lpFullPath$ is the full path including the file name.
* lpString$ should be set to 255 blank spaces before calling the function.
* For example, lpString$=space$(255).
* Upon completion, lpString$ will contain the filename (without the extension).

FullFileNameFromPath

Declare Sub FullFileNameFromPath Lib "DrvPlus.DLL" (ByVal lpFullPath$, ByVal lpString$)

* Extracts the filename (including the extension) from a full path.
* lpFullPath$ is the full path including the file name.
* lpString$ should be set to 255 blank spaces before calling the function.
* For example, lpString$=space$(255).
* Upon completion, lpString$ will contain the filename (including the extension).

DirFromPath

Declare Sub DirFromPath Lib "DrvPlus.DLL" (ByVal lpFullPath$, ByVal lpString$)

* Extracts the directory (including leading & trailing backslashes) from a full path.
* lpFullPath$ is the full path including the file name.
* lpString$ should be set to 255 blank spaces before calling the function.
* For example, lpString$=space$(255).
* Upon completion, lpString$ will contain the directory.

DriveFromPath

Declare Sub DriveFromPath Lib "DrvPlus.DLL" (ByVal lpFullPath$, ByVal lpString$)

* Extracts the drive letter (including the semi-colon) from a full path.
* lpFullPath$ is the full path including the file name.
* lpString$ should be set to 255 blank spaces before calling the function.
* For example, lpString$=space$(255).
* Upon completion, lpString$ will contain the drive letter.

DoesFileExist

Declare Function DoesFileExist% Lib "DrvPlus.DLL" (ByVal lpString$)

* Determines if the specified filename already exists.
* lpString$ is the full path including the file name.
* Returns TRUE (-1) if the file exists; returns FALSE (0) if it does not exist.


RAM Functions

GetRamSize

Declare Function GetRamSize& Lib "DrvPlus.DLL" (ByVal RamType%)

    Global Const BaseRam = 1
    Global Const HwRam = 2
    Global Const ExtRam = 3
    Global Const TotalRam = 4

*	The returned value is in Kilobytes.

*	BaseRam typically returns 640.

*	HwRam (hardware RAM) typically returns 384.

*	ExtRam (extended RAM) returns the amount of RAM above one megabyte.

*	TotalRam returns the total amount of RAM on the system.


Overview
Overview of DrvPlus.DLL

MicroSoft's VisualBasic is a powerful programming language for the Windows operating system.  One of its most appealing features is it extensibility. You can add subroutines and functions directly within the language.  You can use most of the 800+ Windows API functions.  And, you can use virtually any Dynamic Link Library.  The author, with 12 years of programming experience, prefers VB to Assembly and C++.

DrvPlus.DLL is a collection of nearly three dozen functions not included in VB.  Most of these are difficult, if not impossible, to duplicate directly within the VB environment.  For instance, there are functions to ascertain the size of a drive, the amount of free space on a drive, and the amount of used space on a drive.  And, there is a function to determine how many CD drives are present and a function to determine if a particular drive is a CD.  Also included are functions for changing file date and time stamps.  You can also change or delete volume names.  And, you can easily determine if a given filename already exists.

In fact, most of the functions involve drive and file functions left out of VB.  There are also RAM size and low-level data manipulation functions.  This collection of functions should add considerably to your control of the system your application is installed on.

The demo program (written in VB 3.0 standard) demonstrates most of the included functions and reveals a small arsenal of VB programming tricks too.  The VB point-and-click date selection form for changing file date stamps can be easily modified for many similar uses.

Most of the routines in DrvPlus.DLL are written in assembly language to conserve space on your end users' system and to increase response speed within your applications.  And, since DrvPlus.DLL comes with a complete Help file and a practical demonstration project in VB, you'll quickly understand how to use all the new functions so that you can incorporate more power into your own projects.


Shareware Concept

Commercial software is copyrighted (protected by law) and is typically sold through computer and department stores and through discount mail order houses.  The quality of most commercial software is usually very good to excellent.  Public domain software is not copyrighted and is typically found on computer bulletin boards.  The quality of public domain software ranges from poor to very good.  Shareware has similarities with both commercial and public domain software.  The quality is usually good to excellent (frequently surpassing commercial software in price versus features); and shareware can be obtained from computer bulletin boards, on disks in the back of some computer books, computer stores, on racks in some book and computer stores, and from mail order houses.

Shareware is COPYRIGHTED (protected by law).  However, the author typically authorizes distribution of the software to others in the hopes that the users will like the program enough to send in a registration fee which removes a 'Need To Register' message (when the registration number is sent by return mail or an upgrade is provided) and offers notification of program updates and other benefits.  And ... sending the registration fee encourages the author to write MORE software.

Many shareware authors are professional programmers who write these programs in their spare time.  The fundamental concept of shareware is TRY, BEFORE YOU BUY.  And, not only do you get to try the program before you buy; but, you also will typically get professional quality software at well below the market price of comparable commercial packages when you do register.

The FUTURE of shareware depends on YOU.  If you continue using a shareware package, you should register it.

You have 30 days to evaluate DrvPlus.DLL once you install it on your system.  After that, you should either register it or remove it from your system.


Custom DLL's

Digital PowerTOOLS is dedicated to helping VB programmers.  Moreover, we will consider custom DLL and/or VBX projects which have potential mass market appeal.  And, we certainly consider enhancements to our released projects.  Write to:

Digital PowerTOOLS
P.O. Box 97794
Jackson, MS  39288-7794


Copyright Notice

DrvPlus.DLL, Copyright © 1994 by Digital PowerTOOLS

DrvPlus.DLL is distributed under the shareware concept.  Shareware Registration is mandatory for continued use of this product.

And, as shareware, you may evaluate DrvPlus.DLL for a period of no more than 30 days.  After this time you must either register it or remove it from your system. Failure to comply with this condition is a violation of United States and international copyright law.

This program is fully functional, however you will receive the latest version upon registering (with the startup registration reminder removed).  Please register if you use this program for more than the 30-day trial period.  See Shareware Registration for more specific details on registering this product.


Shareware License

Shareware Distribution

You have the right to freely distribute the unregistered version of this software which includes uploading to BBS's provided that:  (1) no files in the original package are altered in any way and that the the software is not sold for profit -- cost of duplication and shipping may, of course, be requested in distribution to end users, (2) all the files must be distributed together, and (3) individual copies of this software may not be sold for more than $10.00.

You must stop selling/distributing copies of this version of this software upon written notice from the author or Digital PowerTOOLS.  The terms of this distribution license are subject to change with the release of new versions of this software.  This software may not be represented as anything other than shareware and the shareware concept must be explained in any advertisement or catalog that quotes a price and on any packaging used to display the disk.  The explanation of the shareware concept must make it clear that with shareware an additional registration fee is required if users continue to utilize the software.

Shareware Registration

You have the right to use this software for a period not to exceed 30 days from installation.  After this trial period, you should either register it or remove it from your system.  Failure to comply with this software license is a violation of U.S. Copyright laws.  See Software Registration for more details.

Site Licenses

Write to receive the latest details on site licenses.

Rack Sales & CD Distribution

Write to request the latest details on rack sales and other For-Profit distribution.  You may not include this shareware on a CD-ROM or other type of package produced by any user group, commercial library, or any for-profit or nonprofit organization; and you may not distribute same with any other product or as an incentive to purchase any other product without the express written permission of Digital PowerTOOLS.  This software may not be sold on retail racks or CD-ROM disks, by either ASP or non-ASP vendors, without specific written permission from the Digital PowerTOOLS.


Shareware Registration

This program is Shareware.  You may evaluate if for a period of no more than 30 days.  After this time you should either register it or remove it from your system. Failure to comply with this condition is a violation of United States and international copyright law.  If you do find that this program is applicable to your computer usage, please send in your registration fee.

Take it for a spin around the block.  Kick the tires.  Look under the hood.  If you like it and use it, register the application.  If it doesn't suit your needs, take it off your system.  If you do enjoy the features that DrvPlus.DLL gives you, try other products from Digital PowerTOOLS too.

(notice the subliminal messages)  This program is provided as Shareware and may be freely distributed (according to the terms under the Shareware License).  If you find the program useful (register today), we ask that you send in the nominal registration fee of $10.00 to the address below.  Many hours of work went into this project.  And, this registration fee includes FREE shipping of the latest version on disk.

Registering this product will also encourage us to write more software under the Shareware concept (register today) for the PC.  If you like it, register it (register today).  If you don't, don't -- and remove it from your system.  Either way, though, we'd like hear your suggestions for improvement (register today) -- send in the Software Evaluation form.  And ... registered users will have any questions answered (register today).  The future of Shareware depends on YOU ... register today.

Be sure to include the PROGRAM TITLE and VERSION NUMBER that you have.  Also specify the disk format that you prefer (3.5-HD or 5.25-HD) of the latest version.  Be sure to include your name, company, and mailing address.  You may also use our order form.

Thank you (yadot retsiger).  You may also contact the author with private mail through America Online, ID# Vernon486.  Mail check, money order, cash and/or suggestions to (Make checks payable to Digital PowerTOOLS):

Digital PowerTOOLS   P.O. Box 97794   Jackson, MS  39288-7794


Order Form

Order Form

This product includes a file in Windows Write format entitled OrderFrm.Wri which you can use to print an order form for registering DrvPlus.DLL.

Sofware Evaluation Form

This product includes a file in Windows Write format entitled EvalFrm.Wri which you can use to print a software evaluation form.

Address

Send to:

Digital PowerTOOLS
P.O. Box 97794
Jackson, MS  39288-7794


Registered License

Upon registration of this product, you may include DrvPlus.DLL in your own application projects to end users.  You may not offer DrvPlus.DLL as an independent application or utility; and, you may not offer DrvPlus.DLL in a manner that would directly compete with the product.

DrvPlus.DLL is provided as a utility to enhance the functionality of your own applications .  As such, you are not permitted to reveal how to use the functions of DrvPlus.DLL to your end users without the express written permission of Digital PowerTOOLS.

It is our sincere hope that as a registered user of this product you find DrvPlus.DLL to be a welcome addition to your library of VB utilities.  If you have questions about usage or suggestions for improvement, please write to let us know.  We appreciate your business.